import React from 'react'
import { Header } from '../Header'

type User = {
  name: string
}

export const Page: React.VFC = () => {
  const [user, setUser] = React.useState<User>()
  return (
    <article>
      <Header
        user={user}
        onLogin={() =>
          setUser({
            name: '畫戟'
          })
        }
        onLogout={() => setUser(undefined)}
        onCreateAccount={() =>
          setUser({
            name: '畫戟'
          })
        }
      />

      <section>
        <h2>
          <a
            href="https://www.npmjs.com/package/create-package-tools"
            target="_blank"
            rel="noopener noreferrer"
          >
            <strong>create-package-tools</strong>
          </a>
        </h2>
        <ul>
          <li>文档...</li>
          <li>文档...</li>
          <li>文档...</li>
          <li>文档...</li>
          <li>文档...</li>
        </ul>
      </section>
    </article>
  )
}
